parasite: Don't show key themes
authorMatthias Clasen <mclasen@redhat.com>
Sun, 4 May 2014 13:13:42 +0000 (09:13 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 11 May 2014 02:04:13 +0000 (22:04 -0400)
But show the builtin theme, even if it doesn't show up in the
filesystem.

modules/other/parasite/themes.c

index ed0ff5c8ebf1f5449709b32bc57f343d1929ae30..1910c8c812da529694e43b33200ff0449efb019c 100644 (file)
@@ -72,10 +72,10 @@ fill_gtk (const char *path, GHashTable *t)
 
   while ((dir_entry = g_dir_read_name (dir)))
     {
-      char *filename = g_build_filename (path, dir_entry, "gtk-3.0", NULL);
+      char *filename = g_build_filename (path, dir_entry, "gtk-3.0", "gtk.css", NULL);
 
-      if (g_file_test (filename, G_FILE_TEST_IS_DIR)
-          && !g_hash_table_contains (t, dir_entry))
+      if (g_file_test (filename, G_FILE_TEST_IS_REGULAR) &&
+          !g_hash_table_contains (t, dir_entry))
         g_hash_table_add (t, g_strdup (dir_entry));
 
       g_free (filename);
@@ -116,6 +116,7 @@ create_gtk (ParasiteThemes *pt)
   gtk_container_add (GTK_CONTAINER (b), l);
 
   t = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+  g_hash_table_add (t, g_strdup ("Raleigh"));
 
   fill_gtk (GTK_DATADIR "/themes", t);
   path = g_build_filename (g_get_user_data_dir (), "themes", NULL);